package com.physics.mps.module.param;

import com.physics.mps.common.util.AssertUtil;
import com.physics.mps.entity.dto.AppParamTreePo;
import com.physics.mps.entity.enums.CodeEnum;
import com.physics.mps.mapper.AppParamGroupMapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author mcsoft
 * @date 2023/9/12 15:52
 * @description
 */
@RequiredArgsConstructor
@Service
public class ParamServiceImpl implements ParamService {


    private final AppParamGroupMapper appParamGroupMapper;

    @Override
    public List<AppParamTreePo> selectAppParamTree(String appId, String moduleId, Integer userId) {
        AssertUtil.isBlank(appId, CodeEnum.PARAM_APP_ID_NOT_EMPTY);
        AssertUtil.isBlank(moduleId, CodeEnum.PARAM_MODULE_ID_NOT_EMPTY);
        return appParamGroupMapper.selectAppParamTree(appId, moduleId, userId);
    }


}
